package com.atguigu.cmsService.controller;


import com.atguigu.cmsService.client.IndexClient;
import com.atguigu.commonutils.R;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * <p>
 * 课程 前端控制器
 * </p>
 *
 * @author Mr.Alan
 * @since 2020-08-16
 */
@RestController
@RequestMapping("/eduService/index")
@CrossOrigin
public class IndexController {

    @Resource
    private IndexClient indexClient;

    @ApiOperation("获取首页的教师和课程推荐")
    @PostMapping("/data")
    public R getTeacherAndCourse() {
        return indexClient.getTeacherAndCourse();
    }
}
